package cn.ds.assets.module.assets.controller.admin.dataQualityRuleSet.vo;

import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import cn.ds.assets.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import java.time.LocalDate;

import static cn.ds.assets.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - 数据质量规则设置分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class BaseDataQualityRuleSetPageReqVO extends PageParam {

    @Schema(description = "主键id")
    private Long[] ids;

    @Schema(description = "内容")
    private String content;

    @Schema(description = "正则表达式")
    private String regularExpression;

    @Schema(description = "格式类型", example = "1")
    private String formatType;

    @Schema(description = "项目id", example = "32035")
    private Long projectId;

    @Schema(description = "质量id", example = "8282")
    private Long qualityRuleId;

    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] createTime;

    @Schema(description = "条件")
    private String ruleCondition;

    @Schema(description = "cron表达式")
    private String cron;

    @Schema(description = "开始时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] startTime;

    @Schema(description = "结束时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] endTime;

    @Schema(description = "自定义sql")
    private String customSql;

    @Schema(description = "对比库")
    private String compareDb;

    @Schema(description = "对比表")
    private String compareTable;

    @Schema(description = "对比字段")
    private String compareColumn;

    @Schema(description = "单位")
    private String unit;

}
